import instance from "./request";

export function getdata(){
    return instance.get("data");
}
export function deldata(id:any){
    return instance.delete(`data/${id}`);
}
export function adddata(obj:any){
    return instance.post(`data`,obj);
}
export function descdata(obj:any){
    return instance.patch(`data/${obj.id}`,obj);
}
export function searchdata(obj:any){
    return instance.get(`data`,{params:{
        'name_like':obj.name,
        'Collect':obj.Collect,
        'value':obj.value,
        'time_like':obj.time,
    }});
}